export const email = /^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/;

export const phone = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;

export const telPhone = /(^[1][3,4,5,6,7,8,9][0-9]{9}$)|(^0[0-9]{2,3}-[0-9]{8})/;

// 密码规则：6-10位字母数字组合
export const password = /^[A-Za-z0-9]{6,9}$/;

// 验证规则：字母、数字、下划线组成，字母开头，4-10位。
export const username = /^[a-zA-z]\w{3,9}$/;

// 金额格式化 每隔三位添加一个逗号
export const money = /\B(?=(\d{3})+(?!\d))/;

// A: 0.0.0.0 - 127.255.255.255
// B: 128.0.0.0 - 192.255.255.255
// C: 192.0.0.0 - 223.255.255.255
// D: 224.0.0.0 - 239.255.255.255
export const ipReg = /^(2(?:[0-4]\d|5[0-5])|1\d{2}|\d{1,2})\.(2(?:[0-4]\d|5[0-5])|1\d{2}|\d{1,2})\.(2(?:[0-4]\d|5[0-5])|1\d{2}|\d{1,2})\.(2(?:[0-4]\d|5[0-5])|1\d{2}|\d{1,2})$/;

// ip/掩码 掩码 1-32
export const ipMaskReg = /^(2(?:[0-4]\d|5[0-5])|1\d{2}|\d{1,2})\.(2(?:[0-4]\d|5[0-5])|1\d{2}|\d{1,2})\.(2(?:[0-4]\d|5[0-5])|1\d{2}|\d{1,2})\.(2(?:[0-4]\d|5[0-5])|1\d{2}|\d{1,2})\/(?:32|31|30|[1-2]\d|[1-9])$/;

// 邮箱
export const emailHash = {
  "qq.com": "http://mail.qq.com",
  "gmail.com": "http://mail.google.com",
  "sina.com": "http://mail.sina.com.cn",
  "163.com": "http://mail.163.com",
  "126.com": "http://mail.126.com",
  "yeah.net": "http://www.yeah.net/",
  "sohu.com": "http://mail.sohu.com/",
  "tom.com": "http://mail.tom.com/",
  "sogou.com": "http://mail.sogou.com/",
  "139.com": "http://mail.10086.cn/",
  "hotmail.com": "http://www.hotmail.com",
  "live.com": "http://login.live.com/",
  "live.cn": "http://login.live.cn/",
  "live.com.cn": "http://login.live.com.cn",
  "189.com": "http://webmail16.189.cn/webmail/",
  "yahoo.com.cn": "http://mail.cn.yahoo.com/",
  "yahoo.cn": "http://mail.cn.yahoo.com/",
  "eyou.com": "http://www.eyou.com/",
  "21cn.com": "http://mail.21cn.com/",
  "188.com": "http://www.188.com/",
  "foxmail.coom": "http://www.foxmail.com"
};
